#ifndef PIDDEVICE_TUNE_H
#define PIDDEVICE_TUNE_H

#include "stdint.h"

#ifdef __cplusplus
extern "C"
{
#endif

	typedef struct
	{
		uint32_t auto_set_time;
		uint8_t ctr_dir; 
		uint8_t state;	 
		uint8_t out;	 
		uint16_t rise_time;
		uint16_t fall_time;
		uint16_t P;
		uint16_t I;
		uint16_t D;
		float pv; 
		float sv; 
		float min;
		float max;
		float ctr_zone;			
		float id_coef;			
		void (*par_save)(void); 
	} pid_tune_type;

	uint8_t pid_tune(pid_tune_type *tune_obj);
	
	void pid_tune_start(pid_tune_type *tune_obj);
	
	void pid_tune_exit(pid_tune_type *tune_obj);

#ifdef __cplusplus
}
#endif

#endif 
